package com.sh.data.engine.application.model.request.management;

import com.sh.data.engine.common.annotation.TrimLength;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * @author: mengzheng.mhc
 * @date: 2024/6/24 10:40
 */
@Data
@Schema
public class SaveProjectRequest {

    @Schema(description = "项目id，编辑时传入", requiredMode = RequiredMode.NOT_REQUIRED)
    private Long id;

    @Schema(description = "项目名称", requiredMode = RequiredMode.REQUIRED)
    @NotBlank(message = "项目名称不能为空")
    @TrimLength(min = 2, max = 32, message = "项目名称长度为2-32个字符")
    private String name;

    @Schema(description = "项目描述", requiredMode = RequiredMode.NOT_REQUIRED)
    private String description;
}
